package com.wsseieiei.fireballgame;


import com.wsseieiei.fireballgame.entity.EntitySb;
import com.wsseieiei.fireballgame.entity.model.modelball2test;
import com.wsseieiei.fireballgame.entity.model.modelsb;
import com.wsseieiei.fireballgame.entity.render.RenderBall2test;
import com.wsseieiei.fireballgame.entity.render.RenderSb;
import com.wsseieiei.fireballgame.init.EntityInit;
import net.minecraftforge.client.event.EntityRenderersEvent;
import net.minecraftforge.event.entity.EntityAttributeCreationEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;


//@Mod.EventBusSubscriber(modid = Main.MOD_ID, value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.MOD)
@Mod.EventBusSubscriber(modid = Main.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)

public class ClientModEventSubscriber

{



    //所有的生物的皮肤贴图信息

    @SubscribeEvent

    public static void onRegisterLayers(EntityRenderersEvent.RegisterLayerDefinitions event) {

        event.registerLayerDefinition(modelsb.LAYER_LOCATION, modelsb::createBodyLayer);
        event.registerLayerDefinition(modelball2test.LAYER_LOCATION, modelball2test::createBodyLayer);
    }



    //所有的生物的渲染信息

    @SubscribeEvent

    public static void onRegisterRenderer(EntityRenderersEvent.RegisterRenderers event) {

        event.registerEntityRenderer(EntityInit.SB.get(), RenderSb::new);
        event.registerEntityRenderer(EntityInit.BALL2TEST.get(), RenderBall2test::new);

    }



    //所有的生物的属性信息

    @SubscribeEvent

    public static void onAttributeCreate(EntityAttributeCreationEvent event) {

        event.put(EntityInit.SB.get(), EntitySb.prepareAttributes().build());

    }



}
